package com.luck.pf.security.dept.logic;

import java.util.List;

import com.luck.org.entity.SysDepartment;
import com.luck.org.entity.SysLog;
import com.luck.pf.common.entity.UserBean;
import com.luck.pf.framework.logic.IBaseLogic;
import com.luck.pf.security.dept.qry.DeptQry;
import com.luck.pf.util.Page;

/**
 * 说明:
 * Copyright: Copyright (c) 2010
 * @author zhangwr 2011-8-10 下午02:39:46
 * @version 1.0
 */
public interface IDeptLogic extends IBaseLogic {
	public Page findDeptPage(DeptQry qry) throws Exception;
	/**
	 * 检查此机构代码存不存在
	 * @param user
	 * @return
	 */
	public boolean checkDept(SysDepartment dept);
	/**
	 * 查询机构，根据登陆用户的权限,tree_no
	 * @param qry
	 * @return
	 * @throws Exception
	 */
	public List<SysDepartment> findDepts(DeptQry qry) throws Exception;
	public SysDepartment saveDept(SysDepartment dept,UserBean userBean) throws Exception;
	public String deleteDept(SysDepartment dept,UserBean userBean, SysLog log) throws Exception;
	/**
	 * 查找此机构下所有子机构
	 */
	public List<SysDepartment> findDepts(Long parentId);
}
